<?= view('phm/highcharts/jsurl') ?>

<figure class="highcharts-figure">
    <div id="container1"></div>
</figure>

<script type="text/javascript">
    Highcharts.chart('container1', {
        chart: {
            type: 'scatter',
            zoomType: 'xy'
        },
        title: {
            text: 'APU引气压力'
        },
        subtitle: {
            text: '来源: acars 报文'
        },
        xAxis: {
            title: {
                enabled: true,
                text: '压力值 (bar)'
            },
            startOnTick: true,
            endOnTick: true,
            showLastLabel: true
        },
        yAxis: {
            title: {
                text: '压力值'
            }
        },
        legend: {
            layout: 'vertical',
            align: 'left',
            verticalAlign: 'top',
            y: 10,
            floating: true,
            backgroundColor: Highcharts.defaultOptions.chart.backgroundColor,
            borderWidth: 1
        },
        plotOptions: {
            scatter: {
                marker: {
                    radius: 5,
                    states: {
                        hover: {
                            enabled: true,
                            lineColor: 'rgb(100,100,100)'
                        }
                    }
                },
                states: {
                    hover: {
                        marker: {
                            enabled: false
                        }
                    }
                },
                tooltip: {
                    headerFormat: '<b>{series.name}</b><br>',
                    pointFormat: '{point.x} cm, {point.y} kg'
                }
            }
        },
        series: [{
            name: '引气压力',
            color: 'rgba(223, 83, 83, .5)',
            data: [
                [
                    "2023-11-13 17:00:00",
                    3.3090661010753513
                ],
                [
                    "2023-11-14 22:00:00",
                    3.1929452017168316
                ],
                [
                    "2023-11-14 22:00:00",
                    3.2929452017168316
                ],
                [
                    "2023-11-14 22:00:00",
                    3.9929452017168316
                ],
                [
                    "2023-11-14 22:00:00",
                    3.4929452017168316
                ],
            ]
        }]
    });

</script>